package com.yizhuoyan.his.webapi.controller.pharmacyoperator.vo;

import com.yizhuoyan.his.entity.CaseRegistrationRecordEntity;
import com.yizhuoyan.his.entity.FinExpenseCategoryEntity;
import com.yizhuoyan.his.entity.HosDepartmentEntity;
import com.yizhuoyan.his.entity.HosDoctorEntity;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalDateTime;
@Data
public class CaseRegistrationRecordVo {
    /**
     * 病历号
     */
    private String no;
    /**
     * 姓名
     */
    private String realname;
    /**
     * 性别
     */
    private Integer gender;
    /**
     * 身份证号
     */
    private String idcard;
    /**
     * 出生日期
     */
    private LocalDate birthdate;

    private Integer age;
    /**
     * 年龄类型 岁 月 天
     */
    private String ageType;
    /**
     * 家庭住址
     */
    private String homeAddress;
    /**
     * 本次看诊日期
     */
    private LocalDate visitDate;
    /**
     * 看诊午别  上午/下午
     */
    private String visitNoon;
    /**
     * 本次挂号科室ID
     */
    private Long registerDepartmentId;
    private HosDepartmentEntity registerDepartment;
    /**
     * 本次挂号医生ID
     */
    private Long registerDoctorId;
    private HosDoctorEntity registerDoctor;
    /**
     * 本次挂号医生级别ID
     */
    private Long registerDoctorLevel;
    /**
     * 结算类别ID
     */
    private Long settleTypeId;
    private FinExpenseCategoryEntity settleType;
    /**
     * 病历本要否  是/否
     */
    private Integer giveCasebook;
    /**
     * 挂号时间
     */
    private LocalDateTime registerTime;
    /**
     * 挂号员ID
     */
    private Long registerOperatorId;
    /**
     * 本次看诊状态
     */
    private Integer visitState;
    public static  CaseRegistrationRecordVo of(CaseRegistrationRecordEntity entity){
        CaseRegistrationRecordVo vo = new CaseRegistrationRecordVo();
        vo.setNo(entity.getNo());
        vo.setRealname(entity.getRealname());
        vo.setGender(entity.getGender());
        vo.setIdcard(entity.getIdcard());
        vo.setBirthdate(entity.getBirthdate());
        vo.setAge(entity.getAge());
        vo.setAgeType(entity.getAgeType());
        vo.setHomeAddress(entity.getHomeAddress());
        vo.setVisitDate(entity.getVisitDate());
        vo.setVisitNoon(entity.getVisitNoon());
        vo.setRegisterDepartmentId(entity.getRegisterDepartmentId());
        vo.setRegisterDepartment(entity.getRegisterDepartment());
        vo.setRegisterDoctorId(entity.getRegisterDoctorId());
        vo.setRegisterDoctor(entity.getRegisterDoctor());
        vo.setRegisterDoctorLevel(entity.getRegisterDoctorLevel());
        vo.setSettleTypeId(entity.getSettleTypeId());
        vo.setSettleType(entity.getSettleType());
        vo.setGiveCasebook(entity.getGiveCasebook());
        vo.setRegisterTime(entity.getRegisterTime());
        vo.setRegisterOperatorId(entity.getRegisterOperatorId());
        vo.setVisitState(entity.getVisitState());

        return vo;
    }
}
